package simple.utils.data.serializers;

import simple.utils.data.Bytes;

import java.io.IOException;

/**
 * Created by martin on 5.5.14.
 */
public class DoubleSerializer implements Serializer<Double> {
    @Override
    public byte[] toBytes(Double aDouble) throws IOException {
        return Bytes.doubleToBytes(aDouble);
    }

    @Override
    public Double fromBytes(byte[] bytes) throws IOException {
        return Bytes.bytesToDouble(bytes);
    }
}
